package com.hmjk.health.util;


public class GlycoseReferenceSet{
	public static final float DEFAULT_GLYCOSYLATED = 7.0f;
	public static final float DEFAULT_LOW = 4.4f;
	public static final float DEFAULT_HIGH = 8.0f;
	
	public String tid;
	public int unit = 1; //mmol/L, 0=mg/dL
	public int voice = 0; //1=open, 0=close
		
	public float glycosylated = DEFAULT_GLYCOSYLATED;
	public float beforelow = DEFAULT_LOW;
	public float beforeupper = DEFAULT_HIGH;	
	public float afterlow = DEFAULT_LOW;
	public float afterupper = DEFAULT_HIGH;
	public float bedtimelow = DEFAULT_LOW;
	public float bedtimeupper = DEFAULT_HIGH;
	public float dawnlow = DEFAULT_LOW;
	public float dawnupper = DEFAULT_HIGH;
	
	public long updatetime = 0;

	public GlycoseReferenceSet(String _tid)
	{
		tid = _tid;
	}
	
	public GlycoseReferenceSet()
	{
		tid = "-1";
	}	
	public boolean compare(GlycoseReferenceSet cmp){
		if(cmp.beforelow != beforelow)
			return true;
		if(cmp.beforeupper != beforeupper)
			return true;
		
		if(cmp.afterlow != afterlow)
			return true;
		if(cmp.afterupper != afterupper)
			return true;
		
		if(cmp.bedtimelow != bedtimelow)
			return true;
		if(cmp.bedtimeupper != bedtimeupper)
			return true;
		
		if(cmp.dawnlow != dawnlow)
			return true;
		
		if(cmp.dawnupper != dawnupper)
			return true;
		
		return false;
	}
}